package com.zzb.framework.user.components;

import com.zzb.framework.role.vo.UserLoginVo;

import javax.servlet.http.HttpServletRequest;

/**
 * 通过request获取用户
 * Created by zhangzhenbin on 17-5-8.
 */
public abstract class AbstractUserManager<T extends UserLoginVo> {

    abstract public String getSessionKey();
    abstract public  HttpServletRequest getRequest();


    public T getCurrentUser() {
        return (T) getRequest().getSession().getAttribute(getSessionKey());
    }
}
